<!DOCTYPE html><html><head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="format-detection" content="telephone=no">
	<title>评论</title>

    <link href="<?php echo TEMPLATE_SITE_URL;?>/css/comment.css" rel="stylesheet" type="text/css">
    <link href="<?php echo TEMPLATE_SITE_URL;?>/css/common.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/zepto.js" charset="utf-8"></script>
</head>

<body>

    <div id="contentbox" style="min-height: 576px;">
        <div class="rateMain">
		            <div class="saleItem">
		                <div class="title" style="background-image: url(<?php echo $output['user']['avatar'];?>)">
		                    <div class="nickname">
		                        <a href="index.php?act=my&op=home&uid=<?php echo $output['user']['user_id'];?>"><?php echo $output['user']['nickname'];?></a>
		                    </div>
		                </div>
		
		                <div class="content">
		                    <div class="goodsImg" style="background-image:url(<?php echo UPLOAD_SITE_URL.'/shop/auction/'.$output['auction']['auction_add_date'].'/'.$output['auction']['auction_img1'];?>);"></div>
		                    <div class="desc"><?php echo $output['auction']['auction_description'];?></div>
		                    <ul>
		                        <li><span>成交金额：</span>￥ <?php echo $output['order']['price'];?> 元</li>
		                        <li><span>成交时间：</span><?php echo date("Y年m月d日 H:i",$output['order']['payment_time']); ?></li>
		                    </ul>
		                </div>
		            </div>

	                <div class="review">
		                <div class="title">争议信息</div>
		                <div class="content">
		                	<textarea placeholder="把具体的纠纷细节写清楚，小二会联系买家和卖家" name="content" id="deal_description"></textarea>	                	
		                </div>
	            	</div>
        		</div>
        		<p class="error" style="margin-left:20px;color:red;display:none;"></p>
                <button class="ratePublish">提 交</button>
            </div>
<script type="text/javascript">
$(function(){
	$('.ratePublish').click(function(){
		var order_id = '<?php echo $_GET['order_id']?>';
		var deal_description = $('#deal_description').val();

		if(deal_description==''){
			$('.error').show();
			$('.error').html('内容不能为空');	
			return false;
		}
		
		$.ajax({
			type:'post',
			url:'index.php?act=order&op=platdeal',
			data:{order_id:order_id,deal_description:deal_description},
			dataType:'json',
			success:function(){
				location.href = 'index.php?act=order&op=orderuserdetail&order_id='+<?php echo $output['order']['id'];?>;
				return false;
			}
		});
	});
	
});
</script>          
</body>
</html>